<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="UTF-8">

<title>For My Pineapple 🍍</title>


<style>

body {

  margin: 0;

  font-family: 'Segoe UI', sans-serif;

  background: linear-gradient(135deg, #ff758c, #ff7eb3);

  height: 100vh;

  display: flex;

  justify-content: center;

  align-items: center;

  color: white;

  text-align: center;

  overflow: hidden;

}


.card {

  background: rgba(255,255,255,0.15);

  padding: 30px;

  border-radius: 25px;

  box-shadow: 0 25px 45px rgba(0,0,0,0.3);

  max-width: 380px;

}


h1 {

  margin-bottom: 15px;

}


p {

  font-size: 16px;

  line-height: 1.6;

}


button {

  padding: 12px 28px;

  font-size: 16px;

  border: none;

  border-radius: 30px;

  cursor: pointer;

  margin: 10px;

}


#yes {

  background: #ff4d6d;

  color: white;

}


#no {

  background: white;

  color: #ff4d6d;

  position: absolute;

}


#result {

  display: none;

}


img {

  width: 200px;

  border-radius: 20px;

  margin-top: 15px;

}


canvas {

  position: fixed;

  top: 0;

  left: 0;

  pointer-events: none;

}

</style>

</head>


<body>


<audio autoplay loop>

  <source src="song.mp3" type="audio/mpeg">

</audio>


<canvas id="fireworks"></canvas>


<div class="card" id="question">

  <h1>Hey Gav 💘</h1>

  <p>

    Tuc  sirf mere boyfriend nahi,<br>

    tu mera sukoon ho🍍<br><br>

    i just wanna ask…<br><br>

    <strong>Will you be my Valentine forever?</strong>

  </p>

  <button id="yes">YES 💖</button>

  <button id="no">NO 🙈</button>

</div>


<div class="card" id="result">

  <h1>Yayyyy Pineapple 🍍💘</h1>

  <p>

    “Tuc naal hoube ho  taan sab kuch perfect lagda ae…<br>

     💞”<br><br>

    Happy Valentine’s Day, Pineapple❤️<br>

    Forever yours 🥰

  </p>

  <img src="his-photo.jpg" alt="My Love">

</div>


<script>

const noBtn = document.getElementById("no");

noBtn.addEventListener("mouseover", () => {

  noBtn.style.left = Math.random() * 80 + "vw";

  noBtn.style.top = Math.random() * 80 + "vh";

});


const yesBtn = document.getElementById("yes");

const question = document.getElementById("question");

const result = document.getElementById("result");


yesBtn.onclick = () => {

  question.style.display = "none";

  result.style.display = "block";

  startFireworks();

};


// FIREWORKS

const canvas = document.getElementById("fireworks");

const ctx = canvas.getContext("2d");

canvas.width = window.innerWidth;

canvas.height = window.innerHeight;


let particles = [];


function startFireworks() {

  setInterval(() => {

    for (let i = 0; i < 100; i++) {

      particles.push({

        x: canvas.width / 2,

        y: canvas.height / 2,

        vx: (Math.random() - 0.5) * 7,

        vy: (Math.random() - 0.5) * 7,

        life: 120

      });

    }

  }, 600);

}


function animate() {

  ctx.clearRect(0,0,canvas.width,canvas.height);

  particles.forEach((p, i) => {

    p.x += p.vx;

    p.y += p.vy;

    p.life--;

    ctx.fillStyle = "rgba(255,255,255,0.9)";

    ctx.fillRect(p.x, p.y, 3, 3);

    if (p.life <= 0) particles.splice(i,1);

  });

  requestAnimationFrame(animate);

}

animate();

</script>


</body>

</html>